home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hyper Stacks 1994 May
/
Hyper Stacks (Pacific HiTech)(1994)[Mac].iso
/
Utilities
/
Stack Tools
/
Stack Tools
/
stack_-1.xml
< prev
next >
Wrap
Extensible Markup Language
|
1994-03-25
|
14KB
|
22 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>2</cardCount>
<cardID>3055</cardID>
<listID>4833</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>•••••••••••••• HANDLERS AND FUNCTIONS IN THIS SCRIPT ••••••••••••••• HANDLERS: 1 openstack, 2 openbackground, 3 closestack, 4 showStacks,• 5 shoWXCMD, 6 showXFCN, 7 hidelists, 8 MakeStack,• 9 makeCatalog, 10 GoThruFolders, 11 SeekStacksInFolder,• 12 dolists, 13 goThisStack, 14 CompactAllStacks,• 15 plingplong, 16 CopyExternals, 17 listcreators,• EXTERNALS: VolumeList,fileType,fileSize,fileCreator,fileModeDate from• Support Stack © Apple Computor Inc• GetFileNames © Chris Thorman• ResIDNamelist from Dialoger professional © theResult SoftWare Inc• MODIFIED 92-12-31 00.09 The number of characters in this script : 15087•••••••••••••••• © Lars-Olof Albertson ••••••••••••••••••••••••••••••/\on openstack -- *** 1 ***if there is not a menu "Stack Catalogue" ¬then create menu "Stack Catalogue"put "New catalogue stack,-,Make a catalogue,-,Show stack list...," &¬"Show XCMD list...,Show XFCN list...,Hide lists,-,Go this stack" &¬",-,Compact all stacks,List all filetypes" ¬into menu "Stack Catalogue"¬with menumsg "MakeStack,,MakeCatalog,,Showstacks,ShowXCMD," & ¬"ShowXFCN,hideLists,,GoThisStack,,CompactAllStacks,listcreators"pass openstackend openstackon openbackground -- *** 2 ***if the short name of this bkgnd = "CatalogCards" ¬thenenable menuitem "Show stack list..." of menu "Stack Catalogue"enable menuitem "Show XCMD list..." of menu "Stack Catalogue"enable menuitem "Show XFCN list..." of menu "Stack Catalogue"enable menuitem "Hide lists" of menu "Stack Catalogue"enable menuitem "Go this stack" of menu "Stack Catalogue"elsedisable menuitem "Show stack list..." of menu "Stack Catalogue"disable menuitem "Show XCMD list..." of menu "Stack Catalogue"disable menuitem "Show XFCN list..." of menu "Stack Catalogue"disable menuitem "Hide lists" of menu "Stack Catalogue"disable menuitem "Go this stack" of menu "Stack Catalogue"end ifend openbackgroundon closestack -- *** 3 ***reset menubarpass closestackend closestackon showStacks -- *** 4 ***show field stacklistend showStackson shoWXCMD -- *** 5 ***show field XCMDlistend showXCMDon showXFCN -- *** 6 ***show field XFCNlistend showXFCNon hidelists -- *** 7 ***hide field stacklisthide field XCMDlisthide field XFCNlisthide field creatorlistend hideListson MakeStack -- *** 8 ***set lockmessages to truelock screenask file "Create a new catalogue stack" ¬with "Stacks & Xternals Catalogue"if it is empty then exit to hypercardput it into theStackpush cdcreate stack theStack with bkgnd 1pop cdgo cd 2push cddomenu "Copy card"go stack thestackdomenu "paste card"put empty into field "xcmd"put empty into field "xfcn"put empty into field "path"put empty into field "bytes"put empty into field "stackname"put empty into field "date"put empty into field "stacklist"put empty into field "XCMDlist"put empty into field "XFCNlist"put empty into field "LastModified"send "domenu compact stack" to hypercardend makestackon makeCatalog -- *** 9 ***global gWhatToDoput "cat" in gWathToDoGoThruFoldersend makeCatalogon GoThruFolders -- *** 10 ***global gWhatToDo,gcreatorlistput empty into gcreatorlist--This handler produces a list of all files within a folder.if gwhatToDo = "Cat" thenanswer "All the stacks or stacks with XCMD:s and XFCN:s only"¬with "All" or "Only with X..."if it is "Only with X..." then put true into onlyXend ifgo cd 1put empty into gbuntlistaput empty into diskarput volumelist() into volrepeat with x = 1 to the number of lines of volif gWhatToDo = "Cat" then put "Make a Catalogue from volume " into promptif gWhatToDo = "Compact" then put "Compact all stacks in volume " into promptif gWhatToDo = "creator" then put "List all filecreators in volume " into promptAnswer prompt & line x of vol with "Cancel" or "No" or "Yes"if it is "cancel" then exit to hypercardif it is "yes" then put line x of vol & return after diskarend repeatif diskar is empty then exit to hypercardput diskar into field volumesgo cd 1 of bkgnd "catalogCards"repeat with i = 1 to the number of lines of diskarput line i of diskar into volput vol into level1put GetFileNames(vol,false) into filelistput vol into directoryset cursor to busyset lockmessages to trueset lockrecent to truelock screenif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(vol,true) into folderlist1if folderlist1 is not empty thenrepeat with y = 1 to the number of lines of folderlist1put line y of folderlist1 into level2put level1 & level2 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist2if folderlist2 is not empty thenrepeat with z = 1 to the number of lines of folderlist2put line z of folderlist2 into level3put level1 & level2 & ":" & level3 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist3if folderlist3 is not empty thenrepeat with å = 1 to the number of lines of folderlist3put line å of folderlist3 into level4put level1 & level2 & ":" & level3 & ":" & level4 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist4if folderlist4 is not empty thenrepeat with e = 1 to the number of lines of folderlist4put line e of folderlist4 into level5put level1 & level2 & ":" & level3 & ":" & level4 & ":" &¬level5 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist5if folderlist5 is not empty thenrepeat with f = 1 to the number of lines of folderlist5put line f of folderlist5 into level6put level1 & level2 & ":" & level3 & ":" & level4 & ":" & ¬level5 & ":" & level6 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist6if folderlist6 is not empty thenrepeat with g = 1 to the number of lines of folderlist6put line g of folderlist6 into level7put level1 & level2 & ":" & level3 & ":" & level4 ¬& ":" & level5 & ":" & level6 & ":" & level7 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist7if folderlist7 is not empty thenrepeat with g = 1 to the number of lines of folderlist7put line g of folderlist7 into level8put level1 & level2 & ":" & level3 & ":" & level4 ¬& ":" & level5 & ":" & level6 & ":" & level7 & ":" & level8 & ":"¬into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist8if folderlist8 is not empty thenrepeat with g = 1 to the number of lines of folderlist8put line g of folderlist8 into level9put level1 & level2 & ":" & level3 & ":" & level4 ¬& ":" & level5 & ":" & level6 & ":" & level7 & ":" &¬level8 & ":"& level9 & ":" into directoryput GetFileNames(directory,false) into filelistif filelist is not empty then SeekStacksInFolder filelist,directory,moddate,onlyXput GetFileNames(directory,true) into folderlist9end repeatend ifend repeatend ifend repeatend ifend repeatend ifend repeatend ifend repeatend ifend repeatend ifend repeatend ifend repeatif gWhatToDo is "cat" then dolistsput empty into msghide msgif gWhatToDo is not "Creator" then plingplongend GoThruFolderson SeekStacksInFolder filelist,directory,moddate,onlyX -- *** 11 ***global gWhatToDo,gCreatorlistrepeat with x = 1 to the number of lines of filelistset cursor to busyif the number of chars of directory > 65 thenput the number of chars of directory into nuCharput char (nuChar - 65) to nuChar of directoryelseput directoryend ifif "Sorry" is in filelist then next repeatif line x of filelist is¬empty or line x of filelist = "icon" then next repeatget filetype(directory & line x of filelist)if gWhatToDo = "Creator" thenput filecreator(directory & line x of filelist) & tab & it into¬fileflagif fileflag is not in gcreatorlist thenput fileflag & tab & line x of filelist & return after gcreatorlistend ifelseif it = "STAK" thenif gWhatToDo = "Cat" thenif onlyx is true thenput residnamelist(directory & line x of filelist,"XCMD") &¬residnamelist(directory & line x of filelist,"XFCN") into testif test is empty then next repeatend ifgo last cddomenu "new card"put directory into field pathput line x of filelist into field stacknameput residnamelist(directory & line x of filelist,"XCMD") into field "XCMD"put residnamelist(directory & line x of filelist,"XFCN") into field "XFCN"put filesize(directory & line x of filelist) into field "bytes"get the number of chars of field bytesput "," before char it - 2 of field bytesconvert filemoddate (directory & line x of filelist) to dateput it into field "LastModified"put the date into field "date"end ifif gWhatToDo = "compact" thengo stack directory & line x of filelistif cantmodify of this stack is true then next repeatif the freesize of stack (directory & line x of filelist) > 0 thenPut "Compacting Stack " & line x of filelist && "with" && ¬the freesize of stack (directory & line x of filelist)send "Domenu compact stack" to hypercardend ifend ifend ifend ifend repeatend SeekStacksInFolderon dolists -- *** 12 ***put empty into xcput empty into xfput empty into slput 0 into countergo cd 1lock screenset lockmessages to trueset lockrecent to truego cd 1 of bkgnd catalogCardsrepeat the number of cards of bkgnd catalogCardsput field stackname & return after sladd 1 to counterput "Making lists from card " & counter && "of total "&& the number of cards of this bkgndrepeat with x = 1 to the number of lines of field xcmdif item 2 of line x of ¬field xcmd & "," & item 1 of line x of ¬field xcmd is not in xc then put item 2 of line x of ¬field xcmd & "," & item 1 of line x of ¬field xcmd & return after xcend repeatrepeat with f = 1 to the number of lines of field xfcnif item 2 of line f of field xfcn & "," & item ¬1 of line f of field xfcn is not in xf then put item 2 of line f of ¬field xfcn & "," & item 1 of line f of ¬field xfcn & return after xfend repeatgo nextend repeatgo cd 1 of bkgnd "CatalogCards"sort xcsort xfsort slput xc into field XCMDlistput xf into field Xfcnlistput sl into field stacklistif field "stackname" is empty then send "domenu cut card" to hypercardend dolistson goThisStack -- *** 13 ***if the short name of this bkgnd <> "Catalogcards" thenbeepexit to hypercardend ifput field path & field stackname into theStackgo stack theStackend goThisStackon CompactAllStacks -- *** 14 ***global gWhatToDopush cdput "compact" into gWhatToDoGoThruFolderspop cdend compactAllStackson plingplong -- *** 15 ***get the mouselocput " *** Finished! Just move the mouse! ***"repeat until the mouseloc <> itplay harpsichord "ee c"wait 2 secend repeatput empty into msghide msgend plingplongon CopyExternals -- *** 16 ***Rescopyquick sourceStack,fname,type,resnameput the result into resulif first char of resul is "E" thenplay oopsanswer "Could not copy " & resname & return & resulend ifhide messageend copyexternalson listcreators -- *** 17 ***global gWhatToDo,gcreatorlistput "creator" into gWhatToDoGoThruFolderssort gcreatorlistAsk file "Save the creator list as ..if it is empty then exit to hypercardput it into theFileopen file thefilewrite "File creator and filetype list " & the date & return &¬return & "CREATOR" & tab & "FILETYPE" & TAB & "EXEMPLE" & return¬to file thefilewrite gcreatorlist to file thefileclose file theFileend listcreators</script>
<background id="2660" file="background_2660.xml" name="" />
<background id="4190" file="background_4190.xml" name="CatalogCards" />
<card id="3055" file="card_3055.xml" marked="false" name="" owner="2660" />
<card id="3855" file="card_3855.xml" marked="false" name="" owner="4190" />
</stack>